**Load Data
use "C:\Users\LGordonRogers\OneDrive - Union of Concerned Scientists\Documents\mainanalysis.dta", clear


**Event History Analysis Settings
replace _t=_t-2009

stset Year, failure (propose==1) 


**Proposal Model 1 
stcox z_istaterr08 z_tanfrecips z_percentblackpop z_totalpop z_tanfblack z_totalrev z_totaldebt z_druguse z_percapitaincome congov2 z_govtideo z_border z_unemploy z_opioiddeath z_women south, vce(cluster state)

**Testing proportional hazards assumptions Model 1 
estat phtest, detail 

**Proposal Model 2

stcox z_istaterr08 z_tanfrecips  z_druguse z_percapitaincome z_unemploy z_opioiddeath z_border z_govtideo, tvc(z_govtideo) vce(cluster state)


**Kaplan-Meier Failure Function Estimate Graphs 
sts graph, failure ci noorigin xlabel(2009(1)2018, valuelabel)
